#include "Socket.hpp"
#include <cstdlib>

// 调用方式 ./TCPServer port(端口号)
int main(int argc, char* argv[])
{
    if(argc != 2)
        std::cout << "User: ./TCPServer port" << std::endl;
    u_int16_t port = std::stoi(argv[1]);
    // 基类指针指向子类对象
    std::unique_ptr<SocketServer::Socket> tcpserver = std::make_unique<SocketServer::TCPServer>(port);
    tcpserver->TCPServerMethod();
    return 0;
}